gtktreeselection: Fix an abort on selecting an invalid range
authorPhilip Withnall <philip.withnall@collabora.co.uk>
Tue, 10 Mar 2015 08:26:34 +0000 (08:26 +0000)
committerPhilip Withnall <philip.withnall@collabora.co.uk>
Wed, 11 Mar 2015 11:24:29 +0000 (11:24 +0000)
commit52858f709c79e4e8ff351240d724d1eafa2f4605
treec7b2607dc3b93b5314446fdfba990a09341963f1
parentd65ccf96ee43e3cd62a705074d452f9f87912ee2
gtktreeselection: Fix an abort on selecting an invalid range

gtk_tree_selection_real_modify_range() has a g_return_if_fail() if the
start or end paths passed to it do not correspond to real tree nodes.
However, GtkTreePaths inherently do not have to be valid, so it should
be acceptable to call gtk_tree_selection_select_range() with
non-existent paths. Replace the g_return_if_fail() by a silent return,
and add a unit test.

https://bugzilla.gnome.org/show_bug.cgi?id=712760
gtk/gtktreeselection.c
testsuite/gtk/treeview.c